import axios from 'axios';

export function getTeacherList(params) {
  return axios.get('/teacher/list', { params });
}
export function addTeacher(data) {
  return axios.post('/teacher/add', data);
}
export function updateTeacher(data) {
  return axios.put('/teacher/update', data);
}
export function deleteTeacher(id) {
  return axios.delete(`/teacher/delete/${id}`);
}
export function resetTeacherPassword(id) {
  return axios.post(`/teacher/reset-password/${id}`);
}
export function updateTeacherRole(id, role) {
  return axios.post(`/teacher/update-role`, { id, role });
}
export function batchDeleteTeachers(ids) {
  return axios.post('/teacher/batch-delete', ids);
}
export function exportTeachers() {
  return axios.get('/teacher/export', { responseType: 'blob' });
}
export function importTeachers(formData) {
  return axios.post('/teacher/import', formData, { headers: { 'Content-Type': 'multipart/form-data' } });
}